import my_array
num = 4
array_ptr = my_array.ptr_uint_array_8(num)

array = my_array.uint_array.frompointer(my_array.p2d_to_puint(array_ptr))
for y in range(num):
    for x in range(8):
        array[y*8 + x] = y*8 + x
print repr(array_ptr)
my_array.increase_A(my_array.p2d_to_puint(array_ptr), num)
my_array.increase_B(array_ptr, num) 
for y in range(num):
    for x in range(8):
        print ("%3d" % array[y*8 + x]) ,
    print ""
my_array.free_array(my_array.p2d_to_puint(array_ptr))

#array = my_array.uint_array.frompointer(array_ptr)
#for i in range(num):
#    array[i] = i
#my_array.revert(array_ptr, num)
#for i in range(num):
#    print array[i]
#my_array.free_array(array)
#
#num = 12
#uint_array_inst = my_array.uint_array(num)
#for i in range(num):
#    uint_array_inst[i] = i
#my_array.revert(uint_array_inst, num)
#for i in range(num):
#    print uint_array_inst[i]

